package gameEngine.com.state;

import android.graphics.Bitmap;
import android.graphics.Color;
import android.graphics.Paint.Style;
import android.view.KeyEvent;
import gameEngine.com.*;
import gameEngine.com.Actor.Actor;

public class StateSplash extends MainActivity {

	public static void SendMessageStateSplash(int type) {
		switch (type) {
		case MESSAGE_CTOR:
			if (splashImage == null)
				splashImage = loadImageFromAsset("image/splash.png");
			break;
		case MESSAGE_UPDATE:
		//	
			if (isKeyPressed(KeyEvent.KEYCODE_ENTER) || isTouchPressScreen())
				changeState(STATE_MAINMENU);	
			break;
		case MESSAGE_PAINT:
			mainCanvas.drawColor(Color.BLACK);
			if (splashImage != null)
				mainCanvas.drawBitmap(splashImage, 0, 0, null);
			if(GameLib.frameCountCurrentState% 6 >3)
			fontsmall.drawString(mainCanvas, "TOUCH THE SCREEN TO CONTINUE",
					SCREEN_WIDTH>>1, SCREEN_HEIGHT- 40, BitmapFont.ALIGN_CENTER);
			break;
		case MESSAGE_DTOR:
			break;
		}
	}

}
